Current Location: Home> Function Categories> octdec

octdec

Convert octal to decimal
Name:octdec
Category:math
Programming Language:php
One-line Description:Convert octal to decimal.

Definition and usage

The octdec() function converts octal to decimal.

Example

 <?php
echo octdec ( "36" ) ;
echo octdec ( "12" ) ;
echo octdec ( "3063" ) ;
echo octdec ( "106" ) ;
?>

Try it yourself

grammar

 octdec ( octal_string )
parameter describe
octal_string Required. Specifies the octal number to be converted.

illustrate

Returns the decimal equivalent value of the octal number represented by the octal_string parameter. The maximum convertible value is 177777777777 or 2147483647 in decimal. Starting with PHP 4.1.0, the function can handle large numbers, in which case it returns the float type.

Similar Functions
  • Sow a better random number generator seed mt_srand

    mt_srand

    Sowabetterrandomnumb
  • Hyperbolic tangent tanh

    tanh

    Hyperbolictangent
  • Round the division result intdiv

    intdiv

    Roundthedivisionresu
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Determine whether it is a legal value is_nan

    is_nan

    Determinewhetheritis
  • Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero. expm1

    expm1

    Returnsexp(number)-1
  • Round floating point numbers round

    round

    Roundfloatingpointnu
Popular Articles